package com.frank.towerrush.activity;

import java.util.ArrayList;
import java.util.List;

import com.frank.towerrush.R;
import com.frank.towerrush.split.Flag;
import com.frank.towerrush.util.SystemParameter.SystemString;
import com.frank.towerrush.view.GameView;

import android.graphics.BitmapFactory;

public class GameActivity extends BaseActivity {

    @Override
    protected void init() {

        int[] v = { 0, 200, 300, 950, 1500, 250, 550, 700, 1000, 590, 1150, 540, 2000 };
        List<Flag> flags = new ArrayList<Flag>();
        int index = 1;
        int x = 0;
        int y = 1;
        while (flags.size() < v.length - 1) {
            flags.add(new Flag(v[x], v[y]));
            index++;
            if (index % 2 == 0) {
                x += 2;
            } else {
                y += 2;
            }
        }

        setContentView(new GameView(this, BitmapFactory.decodeResource(getResources(),
                getIntent().getIntExtra(SystemString.PREFERENCES_GOLD, R.drawable.bg1)), flags));
    }

    @Override
    protected void event() {
        // Do nothing now
    }

    @Override
    protected void loadData() {
        // Do nothing now
    }

}
